import React from 'react';

const CommentLists=({comments}) => {
  return (
    <div className="comments-list-component p-5 bg-light mb-5 rounded rounded-3">
      <label className="form-label fw-bold">评论列表</label>
      <ul className="list-group">
        {
          comments.map((comment, index) =>
            <li
              key={index}
              className="list-group-item bg-primary bg-opacity-75 text-white my-1"
            >
              {comment}
            </li>)
        }
      </ul>
    </div>
  );
};

export default CommentLists;
